export interface PositionListQuery {
  keyword?: string
  workType?: number
  workCity?: number
  period?: number
  salary?: number
  positionType?: number
  ignoreStatus: boolean
  page: number
  size: number
  userId: number
}

export interface PositionItem {
  positionId: number
  positionName: string
  salary: string
  companyName: string
  positionType: string
  workCity: string
  workType: string
  period: string
  recruitNum: number
  publishUserId: number
  publishUserName: string
  applyCount: number
  passCount: number
  admissionCount: number
  isRecommend: boolean
  deadline: string
  status: string
}

export interface PositionApplicationInfo {
  positionId: number
  positionName: string
  recruitNum: number
  applyCount: number
  passCount: number
  admissionCount: number
  status: string
}

export interface PositionDetail {
  positionId: number
  positionName: string
  salary: string
  tags?: string[]
  companyId: number
  companyName: string
  workCity: string
  workPlace?: string
  workType: string
  positionType: string
  period: string
  startDate: string
  recruitNum: number
  positionDesc: string
  positionRequire: string
  publishTime: string
  deadline: string
  isRecommend: boolean
  publishUserId: number
  publishUserName: string
  applyCount: number
  passCount: number
  admissionCount: number
  status: string
  createTime: string
  updateTime: string
}

export interface PositionPageList {
  records: PositionItem[]
  total: number
  size: number
  current: number
  pages: number
}

// 新增职位请求参数
export interface PositionAddOrUpdateRequest {
  positionId?: number
  companyId: number | undefined
  companyName: string
  positionName: string
  positionType: number | undefined
  workType: number | undefined
  workCity: number | undefined
  workPlace?: string
  salary: number | undefined
  period: number | undefined
  startDate: string
  recruitNum: number
  positionDesc?: string
  positionRequire?: string
  publishUserId: number
  deadline: string
  status: number
  isRecommend?: number
}

export type PositionListResponse = ApiResponseData<PositionPageList>
export type PositionDetailResponse = ApiResponseData<PositionDetail>
export type PositionAddResponse = ApiResponseData<boolean>
